package com.oauth.oauth.controller;

import com.oauth.oauth.util.R;
import jakarta.servlet.http.HttpServletRequest;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Date;

@RestController
@RequestMapping("/user/oauth2")
public class OauthController {


    @GetMapping("/test")
    public R token(HttpServletRequest request) {
        System.out.println(request.getHeader("token"));
        System.out.println(request.getParameterMap());
        System.out.println("欢迎使用统一认证中心");
        return R.success().data(new Date());
    }


}
